﻿using System;
using System.Windows;
using FeatureDemo.Helper;
using Microsoft.Phone.Controls;

namespace FeatureDemo.Features.Browser
{
    [Feature("HTML5", "Shows an HTML5 Page", 7.5)]
    public partial class Html5Page : PhoneApplicationPage
    {
        public Html5Page()
        {
            InitializeComponent();

            this.Loaded += (s, e) =>
            {
                DoIt();
            };
        }

        private void DoIt()
        {
            try
            {
                string path = "http://ie.microsoft.com/testdrive/Performance/ParticleAcceleration/";

                _webBrowser.IsScriptEnabled = true;
                _webBrowser.Navigate(new Uri(path));
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }
    }
}